package net.minject.reflection;

import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.List;

public interface Reflector {
    <T> T construct(Class<T> c, Object... initargs);
    
    <T> Constructor<T> findConstructorAnnnotatedBy(Class<T> clazz, Class<? extends Annotation> annotationClass);
    
    List<Field> findFieldsAnnotatedBy(Class<?> clazz, Class<? extends Annotation> annotationClass);
    
    List<Method> findMethodsAnnotatedBy(Class<?> clazz, Class<? extends Annotation> annotationClass);
    
    void setField(Field field, Object object, Object value);
    
    Object invokeMethod(Method method, Object obj, Object... args);

}
